Optimal. Leaf size=104 \[ \frac{B \sqrt{a+i a \tan (e+f x)} \sqrt{c-i c \tan (e+f x)}}{f}-\frac{2 i \sqrt{a} A \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{a+i a \tan (e+f x)}}{\sqrt{a} \sqrt{c-i c \tan (e+f x)}}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.208421, antiderivative size = 104, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 45, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3588, 80, 63, 217, 203} \[ \frac{B \sqrt{a+i a \tan (e+f x)} \sqrt{c-i c \tan (e+f x)}}{f}-\frac{2 i \sqrt{a} A \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{a+i a \tan (e+f x)}}{\sqrt{a} \sqrt{c-i c \tan (e+f x)}}\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 80
Rule 63
Rule 217
Rule 203
Rubi steps
\begin{align*} \int \sqrt{a+i a \tan (e+f x)} (A+B \tan (e+f x)) \sqrt{c-i c \tan (e+f x)} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{A+B x}{\sqrt{a+i a x} \sqrt{c-i c x}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{B \sqrt{a+i a \tan (e+f x)} \sqrt{c-i c \tan (e+f x)}}{f}+\frac{(a A c) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+i a x} \sqrt{c-i c x}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{B \sqrt{a+i a \tan (e+f x)} \sqrt{c-i c \tan (e+f x)}}{f}-\frac{(2 i A c) \operatorname{Subst}\left (\int \frac{1}{\sqrt{2 c-\frac{c x^2}{a}}} \, dx,x,\sqrt{a+i a \tan (e+f x)}\right )}{f}\\ &=\frac{B \sqrt{a+i a \tan (e+f x)} \sqrt{c-i c \tan (e+f x)}}{f}-\frac{(2 i A c) \operatorname{Subst}\left (\int \frac{1}{1+\frac{c x^2}{a}} \, dx,x,\frac{\sqrt{a+i a \tan (e+f x)}}{\sqrt{c-i c \tan (e+f x)}}\right )}{f}\\ &=-\frac{2 i \sqrt{a} A \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{a+i a \tan (e+f x)}}{\sqrt{a} \sqrt{c-i c \tan (e+f x)}}\right )}{f}+\frac{B \sqrt{a+i a \tan (e+f x)} \sqrt{c-i c \tan (e+f x)}}{f}\\ \end{align*}
Mathematica [A] time = 3.3183, size = 102, normalized size = 0.98 \[ \frac{\sqrt{2} e^{-i (e+f x)} \sqrt{\frac{c}{1+e^{2 i (e+f x)}}} \sqrt{a+i a \tan (e+f x)} \left (B e^{i (e+f x)}-i A \left (1+e^{2 i (e+f x)}\right ) \tan ^{-1}\left (e^{i (e+f x)}\right )\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.131, size = 121, normalized size = 1.2 \begin{align*}{\frac{1}{f}\sqrt{a \left ( 1+i\tan \left ( fx+e \right ) \right ) }\sqrt{-c \left ( -1+i\tan \left ( fx+e \right ) \right ) } \left ( A\ln \left ({ \left ( ac\tan \left ( fx+e \right ) +\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac} \right ){\frac{1}{\sqrt{ac}}}} \right ) ac+B\sqrt{ac}\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) } \right ){\frac{1}{\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}}{\frac{1}{\sqrt{ac}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 2.25387, size = 609, normalized size = 5.86 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.48629, size = 751, normalized size = 7.22 \begin{align*} \frac{4 \, B \sqrt{\frac{a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} e^{\left (i \, f x + i \, e\right )} - \sqrt{\frac{A^{2} a c}{f^{2}}} f \log \left (\frac{2 \,{\left (4 \,{\left (A e^{\left (2 i \, f x + 2 i \, e\right )} + A\right )} \sqrt{\frac{a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} e^{\left (i \, f x + i \, e\right )} + \sqrt{\frac{A^{2} a c}{f^{2}}}{\left (2 i \, f e^{\left (2 i \, f x + 2 i \, e\right )} - 2 i \, f\right )}\right )}}{A e^{\left (2 i \, f x + 2 i \, e\right )} + A}\right ) + \sqrt{\frac{A^{2} a c}{f^{2}}} f \log \left (\frac{2 \,{\left (4 \,{\left (A e^{\left (2 i \, f x + 2 i \, e\right )} + A\right )} \sqrt{\frac{a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} e^{\left (i \, f x + i \, e\right )} + \sqrt{\frac{A^{2} a c}{f^{2}}}{\left (-2 i \, f e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, f\right )}\right )}}{A e^{\left (2 i \, f x + 2 i \, e\right )} + A}\right )}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \left (i \tan{\left (e + f x \right )} + 1\right )} \sqrt{- c \left (i \tan{\left (e + f x \right )} - 1\right )} \left (A + B \tan{\left (e + f x \right )}\right )\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \tan \left (f x + e\right ) + A\right )} \sqrt{i \, a \tan \left (f x + e\right ) + a} \sqrt{-i \, c \tan \left (f x + e\right ) + c}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]